<?php
    defined('_JEXEC') or die('Restricted access');

    $moduleclass_sfx = $params->get('moduleclass_sfx','');

    // Thông tin ban 1
    $name_phong_ban1 = trim($params->get('phong1', ''));
    $phone1 = trim($params->get('phone1', ''));
    $yahoo1 = trim($params->get('yahoo1', ''));
    $skype1 = trim($params->get('skype1', ''));

     // Thông tin phòng 2
    $name_phong_ban2 = trim($params->get('phong2', ''));
    $phone2 = trim($params->get('phone2', ''));
    $yahoo2 = trim($params->get('yahoo2', ''));
    $skype2 = trim($params->get('skype2', ''));

     // Thông tin ban 3
    $name_phong_ban3 = trim($params->get('phong3', ''));
    $phone3 = trim($params->get('phone3', ''));
    $yahoo3 = trim($params->get('yahoo3', ''));
    $skype3 = trim($params->get('skype3', ''));
 
?>
<div id="support">
<h3 ><span>Hỗ trợ trực tuyến</span></h3>
<div align="center"  class="<?php echo $moduleclass_sfx; ?>">
    <?php
       
       if ($name_phong_ban3 != "")
       {
           showApi($name_phong_ban3, $phone3, $yahoo3, $skype3);
       }
    ?>
</div>
<?php
function Get_status($yahooid){
  $status = file_get_contents("http://opi.yahoo.com/online?u=$yahooid&m=a&t=1");
  if ($status === '00')
  return false;
  elseif ($status === '01')
  return true;
}


   /*  Xử lý API Yahoo và API Skype*/
function showApi($name_phong_ban, $phone, $yahoo, $skype)
	{
    ?>
        <!-- Hiển thị YahooID -->
        
        <div style="padding-right: 20px;">
            <a href="ymsgr:sendIM?<?php echo $yahoo ?>" style="border-bottom: none; background-image: none; padding: none; margin-right: 20px;">
                <img title="" alt="" src="/templates/izilife/images/yahoo_on.png" border="0" height="76px" width="55px">
            </a>
        
         <!-- Hiển thị SkypeID-->
         <?php 
         if ($skype != "")
         {
         ?>
        
            <a href="skype:<?php echo $skype; ?>?call" style="border-bottom: none; background-image: none; padding: none;">
                <img title="" src="/templates/izilife/images/skype_on.png"  border="0"  height="76px" width="53px">
            </a>
    <hr/>
    </div>
    <?php } ?>
    <?php
   }
?>

<div id="support-bottom">
  <a href="#"> Hướng dẫn mua hàng </a> <br/>
  <a href="#"> Phương thức thanh toán </a><br/> 
  <a href="#"> Phương thức giao hàng </a> <br/>
</div>
</div>